-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: introduce AbstractCursor and its concrete subclasses #2619
Conversation
4d30352
to
df8848e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 hats off 🎩 to this incredible chunk of cursor work!!
6dac300
to
631f982
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions/nits but this looks great. I reviewed the src
changes closely but only took a surface level look at the test changes; I'll take a closer look at tests in my follow-up review.
22dbbb6
to
6ec4082
Compare
673e28d
to
b7a4f1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! (pending a rebase 👍 )
This change introduces a fundamental redesign of the cursor types in the driver. The first change is to add a new `AbstractCursor` type, which is only concerned with iterating a cursor (using `getMore`) once it has been initialized. The `_initialize` method must be implemented by subclasses. The concrete subclasses are generally builders for `find` and `aggregate` commands, each providing their own custom initialization method. NODE-2809
Co-authored-by: Eric Adum <[email protected]>
3336289
to
bcb37b0
Compare
This change introduces a fundamental redesign of the cursor types in the driver. The first change is to add a new
AbstractCursor
type, which is only concerned with iterating a cursor (using
getMore
) once it has been initialized. The_initialize
method must be implemented by subclasses. The concrete subclasses are generally builders forfind
andaggregate
commands, each providing their own custom initialization method.NODE-2809